package com.zb.scheduletask.tasks;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.dao.ext.charger.OmsChargerBespeakBillRecordDao;
import com.zb.scheduletask.ScheduledTask;
import com.zb.service.middleware.OmsBespeakService;
import com.zb.service.middleware.OmsCharStationService;
import com.zb.util.DateUtils;
import com.zb.util.StringUtil;
import com.zb.vo.os.RetVO.OrdersStatus;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
public class UpdateStationScoreByDayTask implements ScheduledTask
{
	private Log log = LogFactory.getLog(UpdateStationScoreByDayTask.class);
	
	@Autowired
	OmsCharStationService omsCharStationService;

	@Override
	public void execute()
	{
		log.info("UpdateStationScoreByDayTask 开始执行");
		
		try
		{
			if (omsCharStationService.updateStationScore()) {
				log.info("UpdateStationScoreByDayTask 执行完毕");
			}else {
				log.info("UpdateStationScoreByDayTask 执行失败");
			}
			
		}
		catch (Exception e)
		{
			log.info("UpdateStationScoreByDayTask 执行失败");
			log.error(e.getMessage(), e);
		}
	}
}
